package Day14;

import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改
/**
 * 2021Java真题:字符统计
 * https://www.lanqiao.cn/problems/2142/learning/
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        String s = scan.next();
        int n = s.length();
        int max = 0;
        int[] arr = new int[26];
        for(int i = 0; i < n; i++){
          arr[s.charAt(i) - 'A']++;
          if(max < arr[s.charAt(i) - 'A']){
            max = arr[s.charAt(i) - 'A'];
          }
        }

        for(int i = 0; i < 26; i++){
          if(arr[i] == max){
            System.out.print((char) (i + 'A'));
          }
        }
        scan.close();
    }
}